package com.cy.myblog.service.impl;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cy.myblog.dao.MultimediaDaoI;
import com.cy.myblog.model.Tmultimedia;
import com.cy.myblog.service.MultimediaServiceI;

@Service("multimediaSerivce")
public class MultimediaServiceImpl implements MultimediaServiceI {

	private MultimediaDaoI multimediaDao;
	
	@Autowired
	public void setMultimediaDao(MultimediaDaoI multimediaDao) {
		this.multimediaDao = multimediaDao;
	}

	public Tmultimedia save(Tmultimedia o){
		o.setId(UUID.randomUUID().toString());
		multimediaDao.save(o);
		return o;
	}
}
